package com.itmuch.dubbo.test;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itmuch.dubbo.test.UserService;

@RestController
public class MovieController {
  @Reference(version = "1.0.0")
  public UserService userService;

  @GetMapping("/user/{id}")
  public User findById(@PathVariable Long id) {
    return this.userService.findById(id);
  }
}
